<?php /* Smarty version Smarty-3.1.8, created on 2012-10-27 18:03:23
         compiled from "D:\personalweb\personal\tomatoframework\tomatotool/template\resource.class.tpl" */ ?>
<?php /*%%SmartyHeaderCode:18854508baf66a8cfe1-61070158%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b1dc4b641cae5f9ed180ef36273d03f9bfae7792' => 
    array (
      0 => 'D:\\personalweb\\personal\\tomatoframework\\tomatotool/template\\resource.class.tpl',
      1 => 1351332182,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '18854508baf66a8cfe1-61070158',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_508baf66ab6147_83617209',
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_508baf66ab6147_83617209')) {function content_508baf66ab6147_83617209($_smarty_tpl) {?><<?php ?>?php

/*
 * Tomato Framework
 * 
 * Copyright 2012-2012 Luax.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * @link http://www.tomatoframework.com
 * @link http://www.luaxlou.com
 * @version $Id$
 */

/**
 * 
 * 
 * @package tomatoframework
 * @author Luax <luaxcn@gmail.com>
 */
class CatalogResource {

    /**
     * 
     * @var CatalogService
     */
    public $catalogService;

    public function _list() {

        return array('catalogs' => $this->catalogService->findAll());
    }

    public function _show($id) {


        return array('catalog' => $this->catalogService->find($id));
    }

    public function _edit($id) {


        return array('catalog' => $this->catalogService->find($id));
    }

    public function _save($id) {
        $catalog = __load_service('catalog');



        $id = $catalog->save($id);



        return array('catalog' => $catalogData);
    }

    public function _delete($id) {
        
        $this->catalogService->delete($id);
 
        return array('catalog' => $catalogData);
    }
}

?<?php ?>><?php }} ?>